Optimal. Leaf size=154 \[ -\frac {40 a^6 x}{c^3}+\frac {40 i a^6 \log (\cos (e+f x))}{c^3 f}+\frac {9 a^6 \tan (e+f x)}{c^3 f}+\frac {i a^6 \tan ^2(e+f x)}{2 c^3 f}-\frac {32 i a^6}{3 f (c-i c \tan (e+f x))^3}+\frac {40 i a^6}{c f (c-i c \tan (e+f x))^2}-\frac {80 i a^6}{f \left (c^3-i c^3 \tan (e+f x)\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.12, antiderivative size = 154, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.097, Rules used = {3603, 3568, 45}
\begin {gather*} \frac {i a^6 \tan ^2(e+f x)}{2 c^3 f}+\frac {9 a^6 \tan (e+f x)}{c^3 f}-\frac {80 i a^6}{f \left (c^3-i c^3 \tan (e+f x)\right )}+\frac {40 i a^6 \log (\cos (e+f x))}{c^3 f}-\frac {40 a^6 x}{c^3}+\frac {40 i a^6}{c f (c-i c \tan (e+f x))^2}-\frac {32 i a^6}{3 f (c-i c \tan (e+f x))^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 45
Rule 3568
Rule 3603
Rubi steps
\begin {align*} \int \frac {(a+i a \tan (e+f x))^6}{(c-i c \tan (e+f x))^3} \, dx &=\left (a^6 c^6\right ) \int \frac {\sec ^{12}(e+f x)}{(c-i c \tan (e+f x))^9} \, dx\\ &=\frac {\left (i a^6\right ) \text {Subst}\left (\int \frac {(c-x)^5}{(c+x)^4} \, dx,x,-i c \tan (e+f x)\right )}{c^5 f}\\ &=\frac {\left (i a^6\right ) \text {Subst}\left (\int \left (9 c-x+\frac {32 c^5}{(c+x)^4}-\frac {80 c^4}{(c+x)^3}+\frac {80 c^3}{(c+x)^2}-\frac {40 c^2}{c+x}\right ) \, dx,x,-i c \tan (e+f x)\right )}{c^5 f}\\ &=-\frac {40 a^6 x}{c^3}+\frac {40 i a^6 \log (\cos (e+f x))}{c^3 f}+\frac {9 a^6 \tan (e+f x)}{c^3 f}+\frac {i a^6 \tan ^2(e+f x)}{2 c^3 f}-\frac {32 i a^6}{3 f (c-i c \tan (e+f x))^3}+\frac {40 i a^6}{c f (c-i c \tan (e+f x))^2}-\frac {80 i a^6}{f \left (c^3-i c^3 \tan (e+f x)\right )}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Both result and optimal contain complex but leaf count is larger than twice
the leaf count of optimal. \(569\) vs. \(2(154)=308\).
time = 3.62, size = 569, normalized size = 3.69 \begin {gather*} -\frac {a^6 \sec (e) \sec ^2(e+f x) (\cos (3 (e+3 f x))+i \sin (3 (e+3 f x))) \left (i \cos (2 e+3 f x)+120 f x \cos (2 e+3 f x)+55 i \cos (4 e+3 f x)+120 f x \cos (4 e+3 f x)-25 i \cos (4 e+5 f x)+60 f x \cos (4 e+5 f x)+2 i \cos (6 e+5 f x)+60 f x \cos (6 e+5 f x)+10 \cos (2 e+f x) \left (11 i+6 f x-3 i \log \left (\cos ^2(e+f x)\right )\right )+\cos (f x) \left (83 i+60 f x-30 i \log \left (\cos ^2(e+f x)\right )\right )-60 i \cos (2 e+3 f x) \log \left (\cos ^2(e+f x)\right )-60 i \cos (4 e+3 f x) \log \left (\cos ^2(e+f x)\right )-30 i \cos (4 e+5 f x) \log \left (\cos ^2(e+f x)\right )-30 i \cos (6 e+5 f x) \log \left (\cos ^2(e+f x)\right )+43 \sin (f x)-60 i f x \sin (f x)-30 \log \left (\cos ^2(e+f x)\right ) \sin (f x)+70 \sin (2 e+f x)-60 i f x \sin (2 e+f x)-30 \log \left (\cos ^2(e+f x)\right ) \sin (2 e+f x)+11 \sin (2 e+3 f x)-120 i f x \sin (2 e+3 f x)-60 \log \left (\cos ^2(e+f x)\right ) \sin (2 e+3 f x)+65 \sin (4 e+3 f x)-120 i f x \sin (4 e+3 f x)-60 \log \left (\cos ^2(e+f x)\right ) \sin (4 e+3 f x)-29 \sin (4 e+5 f x)-60 i f x \sin (4 e+5 f x)-30 \log \left (\cos ^2(e+f x)\right ) \sin (4 e+5 f x)-2 \sin (6 e+5 f x)-60 i f x \sin (6 e+5 f x)-30 \log \left (\cos ^2(e+f x)\right ) \sin (6 e+5 f x)\right )}{12 c^3 f (\cos (f x)+i \sin (f x))^6} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.27, size = 84, normalized size = 0.55
method | result | size |
derivativedivides | \(\frac {a^{6} \left (9 \tan \left (f x +e \right )+\frac {i \left (\tan ^{2}\left (f x +e \right )\right )}{2}-\frac {32}{3 \left (\tan \left (f x +e \right )+i\right )^{3}}+\frac {80}{\tan \left (f x +e \right )+i}-\frac {40 i}{\left (\tan \left (f x +e \right )+i\right )^{2}}-40 i \ln \left (\tan \left (f x +e \right )+i\right )\right )}{f \,c^{3}}\) | \(84\) |
default | \(\frac {a^{6} \left (9 \tan \left (f x +e \right )+\frac {i \left (\tan ^{2}\left (f x +e \right )\right )}{2}-\frac {32}{3 \left (\tan \left (f x +e \right )+i\right )^{3}}+\frac {80}{\tan \left (f x +e \right )+i}-\frac {40 i}{\left (\tan \left (f x +e \right )+i\right )^{2}}-40 i \ln \left (\tan \left (f x +e \right )+i\right )\right )}{f \,c^{3}}\) | \(84\) |
risch | \(-\frac {4 i a^{6} {\mathrm e}^{6 i \left (f x +e \right )}}{3 c^{3} f}+\frac {6 i a^{6} {\mathrm e}^{4 i \left (f x +e \right )}}{c^{3} f}-\frac {24 i a^{6} {\mathrm e}^{2 i \left (f x +e \right )}}{c^{3} f}+\frac {80 a^{6} e}{f \,c^{3}}+\frac {2 i a^{6} \left (10 \,{\mathrm e}^{2 i \left (f x +e \right )}+9\right )}{f \,c^{3} \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )^{2}}+\frac {40 i a^{6} \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )}{f \,c^{3}}\) | \(139\) |
norman | \(\frac {-\frac {40 a^{6} x}{c}-\frac {313 i a^{6}}{6 c f}-\frac {120 a^{6} x \left (\tan ^{2}\left (f x +e \right )\right )}{c}-\frac {120 a^{6} x \left (\tan ^{4}\left (f x +e \right )\right )}{c}-\frac {40 a^{6} x \left (\tan ^{6}\left (f x +e \right )\right )}{c}+\frac {41 a^{6} \tan \left (f x +e \right )}{c f}+\frac {289 a^{6} \left (\tan ^{3}\left (f x +e \right )\right )}{3 c f}+\frac {107 a^{6} \left (\tan ^{5}\left (f x +e \right )\right )}{c f}+\frac {9 a^{6} \left (\tan ^{7}\left (f x +e \right )\right )}{c f}-\frac {132 i a^{6} \left (\tan ^{2}\left (f x +e \right )\right )}{c f}-\frac {123 i a^{6} \left (\tan ^{4}\left (f x +e \right )\right )}{c f}+\frac {i a^{6} \left (\tan ^{8}\left (f x +e \right )\right )}{2 c f}}{c^{2} \left (1+\tan ^{2}\left (f x +e \right )\right )^{3}}-\frac {20 i a^{6} \ln \left (1+\tan ^{2}\left (f x +e \right )\right )}{c^{3} f}\) | \(248\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: RuntimeError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 1.02, size = 173, normalized size = 1.12 \begin {gather*} -\frac {2 \, {\left (2 i \, a^{6} e^{\left (10 i \, f x + 10 i \, e\right )} - 5 i \, a^{6} e^{\left (8 i \, f x + 8 i \, e\right )} + 20 i \, a^{6} e^{\left (6 i \, f x + 6 i \, e\right )} + 63 i \, a^{6} e^{\left (4 i \, f x + 4 i \, e\right )} + 6 i \, a^{6} e^{\left (2 i \, f x + 2 i \, e\right )} - 27 i \, a^{6} + 60 \, {\left (-i \, a^{6} e^{\left (4 i \, f x + 4 i \, e\right )} - 2 i \, a^{6} e^{\left (2 i \, f x + 2 i \, e\right )} - i \, a^{6}\right )} \log \left (e^{\left (2 i \, f x + 2 i \, e\right )} + 1\right )\right )}}{3 \, {\left (c^{3} f e^{\left (4 i \, f x + 4 i \, e\right )} + 2 \, c^{3} f e^{\left (2 i \, f x + 2 i \, e\right )} + c^{3} f\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.45, size = 246, normalized size = 1.60 \begin {gather*} \frac {40 i a^{6} \log {\left (e^{2 i f x} + e^{- 2 i e} \right )}}{c^{3} f} + \frac {20 i a^{6} e^{2 i e} e^{2 i f x} + 18 i a^{6}}{c^{3} f e^{4 i e} e^{4 i f x} + 2 c^{3} f e^{2 i e} e^{2 i f x} + c^{3} f} + \begin {cases} \frac {- 4 i a^{6} c^{6} f^{2} e^{6 i e} e^{6 i f x} + 18 i a^{6} c^{6} f^{2} e^{4 i e} e^{4 i f x} - 72 i a^{6} c^{6} f^{2} e^{2 i e} e^{2 i f x}}{3 c^{9} f^{3}} & \text {for}\: c^{9} f^{3} \neq 0 \\\frac {x \left (8 a^{6} e^{6 i e} - 24 a^{6} e^{4 i e} + 48 a^{6} e^{2 i e}\right )}{c^{3}} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 287 vs. \(2 (140) = 280\).
time = 1.09, size = 287, normalized size = 1.86 \begin {gather*} -\frac {2 \, {\left (-\frac {60 i \, a^{6} \log \left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1\right )}{c^{3}} + \frac {120 i \, a^{6} \log \left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + i\right )}{c^{3}} - \frac {60 i \, a^{6} \log \left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 1\right )}{c^{3}} - \frac {3 \, {\left (-30 i \, a^{6} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} - 9 \, a^{6} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + 61 i \, a^{6} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 9 \, a^{6} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 30 i \, a^{6}\right )}}{{\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - 1\right )}^{2} c^{3}} + \frac {2 \, {\left (-147 i \, a^{6} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{6} + 930 \, a^{6} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} + 2421 i \, a^{6} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} - 3340 \, a^{6} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - 2421 i \, a^{6} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 930 \, a^{6} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 147 i \, a^{6}\right )}}{c^{3} {\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + i\right )}^{6}}\right )}}{3 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 4.75, size = 139, normalized size = 0.90 \begin {gather*} \frac {9\,a^6\,\mathrm {tan}\left (e+f\,x\right )}{c^3\,f}-\frac {\frac {80\,a^6\,{\mathrm {tan}\left (e+f\,x\right )}^2}{c^3}-\frac {152\,a^6}{3\,c^3}+\frac {a^6\,\mathrm {tan}\left (e+f\,x\right )\,120{}\mathrm {i}}{c^3}}{f\,\left (-{\mathrm {tan}\left (e+f\,x\right )}^3-{\mathrm {tan}\left (e+f\,x\right )}^2\,3{}\mathrm {i}+3\,\mathrm {tan}\left (e+f\,x\right )+1{}\mathrm {i}\right )}+\frac {a^6\,{\mathrm {tan}\left (e+f\,x\right )}^2\,1{}\mathrm {i}}{2\,c^3\,f}-\frac {a^6\,\ln \left (\mathrm {tan}\left (e+f\,x\right )+1{}\mathrm {i}\right )\,40{}\mathrm {i}}{c^3\,f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________